package com.publicClass;

import com.JR.GetDate;
import com.util.interfaces.Id;
import com.util.file.Student;
import com.util.file.Teacher;
import com.util.Vessel;

import java.util.Date;
import java.util.List;

public class SchoolClass implements Id, GetDate {
    private int Id;
    private String className;
    private List<Student> students;
    private Date Date;
    private int teacherId;

    @Override
    public int getId() {
        return Id;
    }

    @Override
    public void setId(int id) {
        Id = id;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }
    public List<Student> getStudents() {
        return students;
    }

    public void setStudents(List<Student> students) {
        this.students = students;
    }

    @Override
    public java.util.Date getDate() {
        return Date;
    }

    @Override
    public void setDate(java.util.Date date) {
        Date = date;
    }

    public int getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(int teacherId) {
        this.teacherId = teacherId;
    }

    @Override
    public String toString() {
        JRCRUD<Teacher> jrcrud1 = new JRCRUD<>();
        JRCRUD<Student> jrcrud = new JRCRUD<>();
        System.out.println("学生");
        jrcrud.show(students);
        return "SchoolClass{" +
                "\t\t\t" + Id +
                "\t\t\t" + className +
                "\t\t\t" + Date +
                '}';
    }

//    public void show(int id){
//        JRCRUD<SchoolClass> jrcrud = new JRCRUD<>();
//        System.out.println("班级编号 \t\t\t 班级名称 \t\t\t 创建时间");
//        SchoolClass show = jrcrud.show(id, Vessel.schoolClasses);
//        int i= 0;
//        /*for (Teacher teacher:Vessel.teachers){
//            i++;
//            if (teacher.)
//        }*/
//    }
}
